functions is package{

  dbl has type (((%t) =>%t)) => ((%t) =>%t);
  dbl(F) is let{
    -- ff has type (%t) =>%t;
    ff(X) is F(F(X));
  } in ff;
  
  sum has type (integer) =>integer;
  sum(x) is x+x;
  
  main() do {
    logMsg(info,"doubling sum: $(dbl(sum)(3))");
  }

}